package day5.demo1_线程通信;

public class Test {
    public static void main(String[] args)throws Exception {
        MyThread a = new MyThread();
        Thread t = new Thread(a,"自定义线程");
        t.start();
        Thread.sleep(1);
        synchronized (a){
            System.out.println("主线程notify前。。。");
            a.notify();
            Thread.sleep(5000);
            System.out.println("主线程notify后。。。");
        }
    }
}
